/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.db;

import com.mysql.jdbc.Connection;
import handler.database;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author user
 */
public class DB {

    database db;
    Connection conn;
    Statement statement;
    String query;
    ResultSet rs;

    public DB() {
        try {
            db = new database();
            conn = (Connection) db.getConnection();
            statement = conn.createStatement();
        } catch (SQLException ex) {
            Logger.getLogger(FriendsDB.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(FriendsDB.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(FriendsDB.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(FriendsDB.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
